<?php
	class ProgramacionController extends ApplicationController {
		public $template = "main";  
	  	function index(){		    
			$TemasRelacionados = new TemasRelacionados();
			$Articulos = new Articulos();
			$temas = $TemasRelacionados->find("conditions: tema='Programación'");
			$articulos = array();
			foreach($temas as $tema)
			{
				$articulos[] = $Articulos->find_first("conditions: id=$tema->articulos_id");
			}
			$this->articulos = $articulos;
		}
	}
		
?>
